package site.beanyon.now.model.po;

import java.util.Date;

/**
 * 用户持久化描述类
 */
public class UserPO {
    /**
     * 主键id
     */
    private Integer id;

    /**
     * 用户名
     */
    private String name;

    /**
     * 登录账号/手机号码
     */
    private String tel;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 密码盐
     */
    private String salt;

    /**
     * 性别
     */
    private Byte gender;

    /**
     * 生日
     */
    private Date birthday;

    /**
     * 状态（1：正常，0：不可用，默认为1）
     */
    private Byte status;

    /**
     * 创建时间
     */
    private Date createdAt;

    public UserPO(String name, String tel, String password, String salt, Byte gender, Date birthday) {
        this.name = name;
        this.tel = tel;
        this.password = password;
        this.salt = salt;
        this.gender = gender;
        this.birthday = birthday;
    }

    public UserPO(Integer id, String name, String tel, String password, String salt, Byte gender, Date birthday, Byte status, Date createdAt) {
        this.id = id;
        this.name = name;
        this.tel = tel;
        this.password = password;
        this.salt = salt;
        this.gender = gender;
        this.birthday = birthday;
        this.status = status;
        this.createdAt = createdAt;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Byte getGender() {
        return gender;
    }

    public void setGender(Byte gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String toString() {
        return "UserPO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", tel='" + tel + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", gender=" + gender +
                ", birthday=" + birthday +
                ", status=" + status +
                ", createdAt=" + createdAt +
                '}';
    }
}
